<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                template="/WEB-INF/facelets/parent_template.xhtml">



    <ui:define name="content">  
        <h:form id="theForm">

            <p:dataTable value="#{parentBackingBean.children}" var="student"> 
                <p:column sortBy="#{student.user.fname}">  
                    <f:facet name="header">  
                        <h:outputText value="Student" />  
                    </f:facet>  
                    <h:outputText value="#{student.user.fname}" />  
                </p:column>  

            </p:dataTable> 

            <p:dataTable value="#{parentBackingBean.courses}" var="course"> 
                <p:column sortBy="#{course.courseName}">  
                    <f:facet name="header">  
                        <h:outputText value="Course Name" />  
                    </f:facet>  
                    <h:outputText value="#{course.courseName}" />  
                </p:column>  

                <p:column sortBy="#{course.yearNumber}">  
                    <f:facet name="header">  
                        <h:outputText value="Year" />  
                    </f:facet>  
                    <h:outputText value="#{course.yearNumber}" />  
                </p:column>  
            </p:dataTable>  
        </h:form>
    </ui:define> 


</ui:composition>